<template>
    <el-dialog v-model="show" title="编辑秒杀商品信息" :close-on-click-modal="false">

        <!-- 表格 -->
        <!-- <el-form ref="formRef" :model="data">
            <el-table-column type="selection" />
            <el-form-item label="活动名称" label-width="100px" prop="title">
                <el-input v-model="data.title" autocomplete="off" />
            </el-form-item>
            <el-form-item label="开始时间" label-width="100px" prop="start">
                <div class="demo-date-picker">
                    <div class="block">
                        <el-date-picker v-model="data.startDate" type="date" />
                    </div>
                </div>
            </el-form-item>
            <el-form-item label="结束时间" label-width="100px" prop="end">
                <div class="demo-date-picker">
                    <div class="block">
                        <el-date-picker v-model="data.endDate" type="date" />
                    </div>
                </div>
            </el-form-item>
            <el-form-item label="上线下线" label-width="100px">
                <el-radio-group v-model="data.status" class="ml-4">
                    <el-radio :label="1" size="large">上线</el-radio>
                    <el-radio :label="0" size="large">下线</el-radio>
                </el-radio-group>
            </el-form-item>
        </el-form> -->
        <!-- <template #footer>
            <span class="dialog-footer">
                <el-button @click="emit('hide')">取消</el-button>
                <el-button type="primary" @click="sureFn"> 确定 </el-button>
            </span>
        </template> -->
    </el-dialog>
</template>

<script setup lang="ts">
import { user } from '@/api';
import { watch } from 'vue';

const props = defineProps({
    show: {
        type: Boolean,
        default: false
    },
    shopid: {
        type: Number,
        default: 0
    }
})
// console.log(props.shopid);

// user.shopIDgetApi(props.shopid).then(res => {
//     if (res.code === 200) {
//         console.log(res.data);

//     }
// })

watch(() => props.shopid,
    () => {
        if (props.shopid === 0) {
            return
        }
        user.shopIDgetApi(props.shopid).then(res => {
            if (res.code === 200) {
                // Object.assign(data, res.data)
                // console.log(res.data);

            }
        })
    })
</script>

<style scoped>

</style>